home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET
/
BCI NET Dec 94.iso
/
archives
/
programming
/
libraries
/
newiff.lha
/
NewIFF
/
NewIFF39.lha
/
newiff39
/
iffp
/
gencat
< prev
next >
Wrap
AmigaDOS Script File
|
1993-09-28
|
2KB
|
56 lines
.key basename/k,prefix/k,catname/k,leftid/k,killo/k
; Amiga script to generate xxxstrings.h from xxx.cd (here "iffp" is xxx)
.def basename "iffp"
.def prefix ""
.def catname "iffp"
.def leftid "5"
.def killo " /modules/#?.o "
.bra {
.ket }
; make {basename}strings.h from {catname}.cd
; requires locale.library "catcomp" tool
which >NIL: catcomp
if warn
echo "Locale.library catcomp utility required - exiting..."
quit
endif
ask "*NOK to delete dependent .o files ({killo}) <y or n> ? "
if warn
echo "deleting dependent .o files"
delete {killo}
else
echo "warning - your .o's may no longer match your strings"
endif
echo "Creating {basename}strings.h header"
catcomp {catname}.cd cfile={basename}strings.h
; Create EDIT commands to insert {prefix} before TEXTTABLE and AppStrings
;echo >ram:tempedcom{$$} "GB/TEXTTABLE/{prefix}/"
;echo >>ram:tempedcom{$$} "GB/AppStrings/{prefix}/"
;echo >>ram:tempedcom{$$} "GB/STRINGARRAY/{prefix}/"
;echo "Performing automatic edit to add prefix: {prefix}"
;edit from {basename}strings.h to ram:tempstrings{$$}.h with ram:tempedcom{$$}
;copy ram:tempstrings{$$}.h {basename}strings.h
;delete >NIL: ram:tempstrings{$$}.h ram:tempedcom{$$}
;echo "Creating {basename}stringids.h"
;search >{basename}stringids.h {basename}strings.h " {leftid}0" nonum
;search >>{basename}stringids.h {basename}strings.h " {leftid}1" nonum
;sample blank translation (.ct) creation line
catcomp {catname}.cd ctfile={catname}.ct
echo "{basename}strings.h and blank {catname}.ct complete"
;sample translation catalog creation line
;catcomp {catname}.cd translation=translations/francais/{catname}.ct catalog=catalogs/francais/{catname}.catalog
echo "*NRemember, if necesary, to copy {basename}strings.h to the actual"
echo "include directory it is referenced from in your source code."